import Taro from '@tarojs/taro'
import API from '../utils/request'

export function getTop() {
  // const res = {
  //   code: 0,
  //   data: []
  // }
  // return res
  return API.get({
    url: `/post/list/top`
  })
}

export function recommend(begin: string, direction: number, pageIndex: number, pageSize: number) {
  // const res = {
  //   code: 0,
  //   data: []
  // }
  // return res
  return API.post({
    url: '/post/list/recommend',
    data: {
      begin,
      direction,
      pageIndex,
      pageSize
    }
  })
}
